<?
include '../adphpgtk.php';

$ad = new AdPHPGtk();
$janela = $ad->newWindow('upaupa', 500, 300, Gtk::WIN_POS_CENTER);

//new model with just one column of type string
$store = new GtkTreeStore(Gtk::TYPE_STRING);

//create root entry: parent parameter is NULL
$root = $store->append(null, array('This is the root'));
//Create a child entry below the root one
$child = $store->append($root, array('Child of root'));
//Create a second child of root
$store->append($root, array('Second child'));

//create another root entry
$root2 = $store->append(null, array('Another root'));

//create empty root entry
$empty = $store->append();
//create empty entry below child
$subchild = $store->append($child);

$tree = new GtkTreeView($store);

$tree->append_column(
    new GtkTreeViewColumn('String column', new GtkCellRendererText(), 'text', 0)
);
/*
$renderer = new GtkCellRendererText();
$column = new GtkTreeViewColumn('Title', $renderer, 'text', 0);
$tree->append_column($column);
 */

$janela->add($tree);

$janela->show_all();

?>
